#ifndef F_UAH_HUMSAT1C_h
#define F_UAH_HUMSAT1C_h

// ***********************************************************************

// class EDROOMTopContext

// ***********************************************************************



class EDROOMTopContext {

protected:

enum EDROOMUAH_HUMSAT1Signal { EDROOMSignalTimeout, EDROOMSignalDestroy, SToListening, SToStandBy, SKeepOnComm, STMToTransmit, SToComm, SInStandBy, STMTransmited, SCommConfigured, STCReceived, SCommInterrupted };


	friend class UAH_HUMSAT1;

	UAH_HUMSAT1 &EDROOMcomponent;

	CEDROOMMessage * &Msg;

	CEDROOMMessage * &MsgBack;

	//Ports

	CEDROOMInterface & SSICtrl;
	CEDROOMInterface & PlannerSGIControl;
	CEDROOMTimingInterface & Timer;

	enum edroomStateId{I, SubEstado1};

	enum IdTrans{Transicion0, Transicion1,  EDROOMMEMORIA };

	//Constantes



	//Variables



	//Pool



	// CONSTRUCTORES

	EDROOMTopContext (UAH_HUMSAT1 &act );

	EDROOMTopContext ( EDROOMTopContext &contex );

public:

	bool EDROOMSearchContextTrans(TEDROOMTransId &edroomCurrentTrans);

	void EDROOMNuevoMens () { EDROOMcomponent.EDROOMNewMsg(); }

	// Funciones Definidas por el usuario

	void	FIni();

	void	FShowTime();

	void	FWatchDog();

};

// ***********************************************************************

// class EDROOMTopState

// ***********************************************************************



class EDROOMTopState : public EDROOMTopContext {

protected:



	EDROOMTopContext::edroomStateId edroomCurrentState;

	EDROOMTopContext::edroomStateId edroomNextState;

	//Variables



	//Pools



public:

	// CONSTRUCTOR

	EDROOMTopState (UAH_HUMSAT1 &act );


	// EDROOMBehaviour**********************************************

	void EDROOMBehaviour();

	// Inicio**********************************************

	void EDROOMInicio();

	// ***********************************************************************

	// SubEstado Inicial 

	// ***********************************************************************



	TEDROOMTransId EDROOMIllegada();

	// ***********************************************************************

	// SubEstado Hoja SubEstado1

	// ***********************************************************************



	TEDROOMTransId EDROOMSubEstado1llegada();

};


#endif
